package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

import com.estore.entity.Categories;

public class CategoriesMapper implements RowMapper<Categories> {

	@Override
	public Categories mapRow(ResultSet rs, int arg1) throws SQLException {
		Categories categories = new Categories();
		categories.setCatID(rs.getInt("catId"));
		categories.setCatName(rs.getString("catName"));
		categories.setMainCatID(rs.getInt("maincatid"));
		return categories;
	}

}
